# -*- coding: utf-8 -*-

from odoo import models, fields


class BasicFamilySign(models.Model):
    _name = 'basic_family_sign'
    _description = '家庭签约表'

    signing_agency_id = fields.Char(string="签约机构")
    signing_team_id = fields.Char(string="签约团队")
    signing_team_tele = fields.Char(string="签约团队电话")

    home_phone = fields.Char(string="家庭电话")
    home_address = fields.Char(string="家庭住址")
    contractor = fields.Char(string="签约人")
    contract_doc = fields.Char(string="签约医生")
    valid_term = fields.Integer(string="有效期")
    signa_time = fields.Date(string="签约日期", default=fields.Date.today())
    ref_results = fields.Selection([
        ('0', '否'),
        ('1', '是')],
        string="是否解约")

    createUser = fields.Char(string="建档人")
    createUnit = fields.Char(string="建档机构")
    division_id = fields.Char(string="所属区划ID")
    org_id = fields.Char(string="所属机构ID")
    create_time = fields.Date(string="创建时间", default=fields.Date.today())
    update_time = fields.Date(string="更新时间", default=fields.Date.today())
    update_operator_id = fields.Char(string="更新操作人")

    termin_reason = fields.Char(string="解约缘由")
    dissolver = fields.Char(string="解散人")
    dissol_time = fields.Date(string="解散时间", default=fields.Date.today())
    termin_mod_status = fields.Selection([
        ('0', '未修改不需上传'),
        ('1', '修改需要上传')],
        string="解约修改状态")

    guard_name = fields.Char(string="监护人姓名")
    guard_cert_num = fields.Char(string="监护人身份证号")
    guard_contact_num = fields.Char(string="监护人联系电话")
    contractor_rel = fields.Char(string="与签约人关系")
